<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		
		<style>
			.red{
				background-color: aqua;
			}
			
		</style>
		
		
	</head>
	
	<body>
		<div id="app">
			
			<!--属性绑定  :href-->
			<a :href="url">百度</a>
			
			<!--事件绑定  @click-->
			
			<div  class="red">这里没有事件</div>
			
			<div :class="{red:flag}" >背景颜色测试</div>
			
			<button @click="flag =!flag"  >背景颜色切换</button> <br />
			
			<button @click="send()"  >发送数据</button>
			
			
			
		</div>
		
		
		<script  src="../js/vue.js"></script>
		<script src=”https://unpkg.com/axios/dist/axios.min.js”></script>
		
		<script>
		const  app=new  Vue({
			el: "#app",
			data: {
				name: "vue案例" ,
				url: "https://www.baidu.com/",
				flag: false
			},
			methods:{
				 send(){
					 axios({
					      method: 'get',
					      url: 'http://localhost:9090/employee/list'
					      }).then(function(res){
							  
					        console.log(res);
					      });
				 },
				 change(){
					 
				 }
				
				 
				
			}
			
		})
	</script>	
		
		
		
	</body>
</html>
